package com.frank.loadinglibrary.common;

import com.frank.loadinglibrary.base.basecomponent.BaseComponent;
import ohos.agp.components.AttrSet;
import ohos.app.Context;

/**
 * @author : frank
 * @date : 2021/4/29 16:05
 */
public abstract class BaseLoadingComponent<T extends BaseLoadingComponent> extends BaseComponent {

    //配置开启透明度动画
    protected boolean enableAlphaAnimator = false;

    //配置动画时长
    protected int durtion = 1000;

    public void setDurtion(int durtion) {
        this.durtion = durtion;
    }

    public T setEnableAlphaAnimator(boolean enableAlphaAnimator) {
        this.enableAlphaAnimator = enableAlphaAnimator;
        return (T) this;
    }

    protected BaseLoadingComponent(Context context) {
        this(context, null);
    }

    protected BaseLoadingComponent(Context context, AttrSet attrSet) {
        this(context, attrSet, null);
    }

    protected BaseLoadingComponent(Context context, AttrSet attrSet, String styleName) {
        super(context, attrSet, styleName);
    }

    protected BaseLoadingComponent(Context context, AttrSet attrSet, int resId) {
        super(context, attrSet, resId);
    }




}
